<%@page contentType="text/html; charset=ISO-8859-1" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

	
<%@page import="com.sebscape.sebcms.setup.domain.SetupConfiguration"%><style type="text/css">
		@import "http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dijit/themes/nihilo/nihilo.css";
		@import "http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dijit/themes/tundra/tundra.css";
	</style>    
	
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js"
		    djConfig="parseOnLoad:true, isDebug:false"></script>
	<script type="text/javascript">
		dojo.require("dojo.parser");
		dojo.require("dijit.layout.ContentPane");
		dojo.require("dijit.layout.TabContainer");
		dojo.require("dijit.form.Button");
	</script>
<!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH -->
<script type="text/javascript" src="/javascript/tinymce/tiny_mce.js"></script>

<c:set var="object" value="${sebcms_list[0]}" />
<%
	SetupConfiguration conf = (SetupConfiguration)pageContext.findAttribute( "object" );
	pageContext.setAttribute( "sebcms_object", conf );
%>
<c:url value="/admin/site/update" var="submitUrl"/>
<c:if test="${!empty sebcms_object.id}">
	<c:url value="/admin/site/update" var="submitUrl"/>
</c:if>

<form action="<c:out value="${submitUrl}" />" method="post">
	<c:if test="${!empty sebcms_object.id}">
		<input type="hidden" name="persistedObject.id" value="<c:out value="${sebcms_object.id}" />" />
	</c:if>

	<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
		style="float:left;width:624px;height:350px;padding:0;spacing:0" class="tundra">

		<div id="one" dojoType="dijit.layout.ContentPane" title="General">
			<%-- General Info Begin... --%>
				<table><tr>
					<td><a href="http://picasa.google.com" style="text-decoration: none"><img src="<c:url value="/layouts/default/images/config1.png"/>" border="none"/></a>
					</td>
					<td valign="bottom">General / Miscellaneous Settings for the site.
					</td>
				</tr></table>
				<br/>
				Site Name <input type="text" name="persistedObject.name" value="<c:out value="${sebcms_object.name}" />" /><br/><br/>
				Brief Description <input type="text" name="persistedObject.description" value="<c:out value="${sebcms_object.description}" />" /><br/><br/>
				Contact Info<input type="text" name="persistedObject.contactInfo" value="<c:out value="${sebcms_object.contactInfo}" />" /><br/><br/>
			<%-- ...General Info End. --%>
		</div>
		
		<div id="two" dojoType="dijit.layout.ContentPane" title="eMail">
			<%-- eMail Info Begin... --%>
				<table><tr>
					<td><a href="http://picasa.google.com" style="text-decoration: none"><img src="<c:url value="/layouts/default/images/email_server.png"/>" border="none"/></a>
					</td>
					<td valign="bottom">These settings allow the site to send administrative emails to users.
					</td>
				</tr></table>
				<br/>
				eMails From value <input type="text" name="persistedObject.emailAdminFrom" value="<c:out value="${sebcms_object.emailAdminFrom}" />" /><br/><br/>
				<%--
				Server Address <input type="text" name="persistedObject.emailServer" value="<c:out value="${sebcms_object.emailServer}" />" /><br/><br/>
				SMTP Password <input type="text" name="persistedObject.emailSmtpPassword" value="<c:out value="${sebcms_object.emailSmtpPassword}" />" /><br/><br/>
				SMTP username <input type="text" name="persistedObject.emailSmtpUsername" value="<c:out value="${sebcms_object.emailSmtpUsername}" />" /><br/><br/>
				--%>
				Prefix for eMail Subject <input type="text" name="persistedObject.emailAdminSubjectPrefix" value="<c:out value="${sebcms_object.emailAdminSubjectPrefix}" />" /><br/><br/>
				Email Template sent to new users:<br/>
				 <textarea name="persistedObject.emailTemplateWelcomeUser" rows="20" cols="60"><c:out value="${sebcms_object.emailTemplateWelcomeUser}" /></textarea>
				 <br/><br/>
				Disclaimer Text <input type="text" name="persistedObject.emailDisclaimerContent" value="<c:out value="${sebcms_object.emailDisclaimerContent}" />" /><br/><br/>
			<%-- ...eMail Info End. --%>
		</div>
		
		<div id="three" dojoType="dijit.layout.ContentPane" title="Picasa">
			<%-- Google Picasa Begin... --%>
				<table><tr>
					<td><a href="http://picasa.google.com" style="text-decoration: none"><img src="<c:url value="/layouts/default/images/google_picasa_logo.jpg"/>" border="none"/><br/>
						&copy;2009 Google
						<br/><font size="-1">A service from Google.</font></a>
					</td>
					<td valign="bottom">This site uses Picasa for images. While pages may choose their
						own albums, use these fields to specify default values.
					</td>
				</tr></table>
				<br/>
				Picasa Default Album Name <input type="text" name="persistedObject.picasaDefaultAlbumName" value="<c:out value="${sebcms_object.picasaDefaultAlbumName}" />" /><br/><br/>
				Service Username <input type="text" name="persistedObject.picasaServiceUsername" value="<c:out value="${sebcms_object.picasaServiceUsername}" />" /><br/><br/>
				Service Password <input type="password" name="persistedObject.picasaServicePassword" /><br/><br/>
			<%-- ...Google Picasa End. --%>
		</div>
		
		<div id="four" dojoType="dijit.layout.ContentPane" title="Calendar">
			<%-- Google Calendar Begin... --%>
				<table><tr>
					<td><a href="http://calendar.google.com" style="text-decoration: none"><img src="<c:url value="/layouts/default/images/google_calendar_logo.gif"/>" border="none"/><br/>
						&copy;2009 Google
						<br/><font size="-1">A service from Google.</font></a>
					</td>
					<td valign="bottom">Various pages may display one or more calendars (events, closings, etc.). These values offer default
						values used by the pages.
					</td>
				</tr></table>
				<br/>
				<i>Not YET implemented.</i>
			<%-- ...Google Calendar End. --%>
		</div>
		
		<div id="five" dojoType="dijit.layout.ContentPane" title="Store">
			<%-- Google Store Begin... --%>
				<table><tr>
					<td><a href="http://picasa.google.com" style="text-decoration: none"><img src="<c:url value="/layouts/default/images/google_checkout_logo.gif"/>" border="none"/><br/>
						&copy;2009 Google
						<br/><font size="-1">A service from Google.</font></a>
					</td>
					<td valign="bottom">Settings to integrate your Google Store into your website.
					</td>
				</tr></table>
				<br/>
			<i>Not YET implemented.</i>
			<%-- ...Google Store End. --%>
		 </div>
		
	</div>

	<table style="clear:both">
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" value="save" name="submit" /></td>
		</tr>
	</table>
			
</form>